package com.wx.soft.contoller.sys;

import com.wx.sys.model.SysUser;
import com.wx.sys.service.SysUserFeignApi;
import com.wx.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

/**
 * Created by king-pc on 2018/12/4.
 */
@RestController
@RequestMapping("/user")
public class SysUserContoller {

    @Autowired
    private SysUserFeignApi sysUserFeignApi;

    /**
     *
     * @param account
     * @return
     */
    @GetMapping("/getUser")
    public String getUser(String account){
        SysUser user = sysUserFeignApi.getUserInfo(account);
        user.setCreateTime(new Date());
        return R.ok(user);

    }
}
